home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 51 / PCGamer51_17Demos.iso / VIDEO / V102401.dxr / 00036_Go to Movie.ls < prev    next >
Encoding:
Text File  |  2000-10-03  |  1.7 KB  |  64 lines

  1. property movieName, playMode, whichevent
  2.  
  3. on initGotoMovie me
  4.   init(me)
  5. end
  6.  
  7. on mouseUp me
  8.   if whichevent = #mouseUp then
  9.     init(me)
  10.   end if
  11.   cursor(-1)
  12. end
  13.  
  14. on prepareFrame me
  15.   if whichevent = #prepareFrame then
  16.     init(me)
  17.   end if
  18. end
  19.  
  20. on mouseEnter me
  21.   cursor(280)
  22. end
  23.  
  24. on mouseLeave me
  25.   cursor(-1)
  26. end
  27.  
  28. on exitFrame me
  29.   if whichevent = #exitFrame then
  30.     init(me)
  31.   end if
  32. end
  33.  
  34. on init me
  35.   set the movieName of me to get_filename(movieName)
  36.   case playMode of
  37.     "Go to":
  38.       go(1, movieName)
  39.     "Play and Return":
  40.       play movie movieName
  41.   end case
  42. end
  43.  
  44. on get_filename f_name
  45.   if not (f_name contains ".dir") then
  46.     set f_name to f_name & ".dir"
  47.   end if
  48.   if (f_name contains "/") or (f_name contains "\") then
  49.     if not f_name contains ":" then
  50.       set f_name to the pathName & f_name
  51.     end if
  52.   end if
  53.   return f_name
  54. end
  55.  
  56. on getPropertyDescriptionList
  57.   set p_list to [#movieName: [#comment: "Movie:", #format: #string, #default: "       "], #playMode: [#comment: "Play Mode:", #format: #symbol, #range: ["Go to", "Play and Return"], #default: "Go to"], #whichevent: [#comment: "Initializing Event:", #format: #symbol, #range: [#mouseUp, #prepareFrame, #exitFrame, #initGotoMovie], #default: #mouseUp]]
  58.   return p_list
  59. end
  60.  
  61. on getBehaviorDescription
  62.   return "Plays a new Director movie in the same window." & RETURN & "ΓÇó Movie - Enter the file name of a movie to play." & RETURN & "ΓÇó Play Mode - Choose Play and Return to return to the current movie when the Playback Head reaches the end of the other movie or when the Play Done behavior is encountered. Choose Go To to play the other movie without returning to the current movie." & RETURN & "ΓÇó Initializing Event - Specify the event that triggers the behavior."
  63. end
  64.